package com.example.controller;

import com.example.common.Result;
import com.example.model.entity.CreatorCard;
import com.example.service.CreatorCardService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 创作者卡片控制器
 */
@RestController
@RequestMapping("/api/v1/creator-cards")
public class CreatorCardController {
    
    private final CreatorCardService creatorCardService;
    
    public CreatorCardController(CreatorCardService creatorCardService) {
        this.creatorCardService = creatorCardService;
    }
    
    /**
     * 获取所有创作者卡片
     */
    @GetMapping
    public Result<List<CreatorCard>> listCreatorCards() {
        List<CreatorCard> cards = creatorCardService.listCreatorCards();
        return Result.success(cards);
    }
} 